package com.homedo.microservice.open.service.gateway.alert.gateway.bean.po.enhanced;

import com.homedo.common.dao.bean.po.enhanced.base.BaseEnhanced;
import com.homedo.microservice.open.service.gateway.alert.gateway.bean.po.Alerting;
import org.springframework.beans.BeanUtils;

import java.util.Date;

/**
 * @author 作者 jgshun
 * @date 创建时间 2018年10月16日 16时44分30秒
 */
public class AlertingEnhanced extends BaseEnhanced {
    public AlertingEnhanced(Alerting alerting) {

        BeanUtils.copyProperties(alerting, this);

        //自动生成 细微误差自己调整

        if (alerting.getServiceId() != null) {
            RouteServiceEnhanced routeServiceEnhanced = new RouteServiceEnhanced();
            routeServiceEnhanced.setId(alerting.getServiceId());
            this.routeServiceEnhanced = routeServiceEnhanced;
        }
    }

    public AlertingEnhanced() {
    }

    private Integer id;
    private String applicationName;
    private RouteServiceEnhanced routeServiceEnhanced;
    private String url;
    private Date createTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getApplicationName() {
        return applicationName;
    }

    public void setApplicationName(String applicationName) {
        this.applicationName = applicationName;
    }

    public RouteServiceEnhanced getRouteServiceEnhanced() {
        return routeServiceEnhanced;
    }

    public void setRouteServiceEnhanced(RouteServiceEnhanced routeServiceEnhanced) {
        this.routeServiceEnhanced = routeServiceEnhanced;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }


}